﻿//angular post 请求
$scope.regist = function () {

    showLoading();
    url = GetPathName() + "/Home/Getfloorplan/";

    var Jsondata = $scope.registObj;
    $http({
        url: url,
        method: 'POST',
        data: Jsondata,
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    }).success(function (response) {
        closeLoading();
        alert("success");
    }).error(function () {
        alert("error");
        closeLoading();
    })
}
//angular get 请求
$scope.loadData = function () {
    showLoading();
    url = GetPathName() + "/Home/GetRoomResouceJson/";

    $http.get(url).success(function (response) {
        closeLoading();
        $scope.roomResource = response;
        //success loading

    }).error(function () {
        alert("error");
        closeLoading();
    });
}